import React, { Component } from 'react'
import { Link } from 'react-router-dom'
import { Button } from 'antd'

// const history = useHistory()
export default class Forms extends Component {
    constructor(props) {
        super(props)
        
    }

    handleParams() {
        
        // history.push('/my')

        this.props.history.push('/my')
    }

    render() {
        
        return (
            <div className="forms">
                <p>这个是公共组件 forms</p>

                <br />

                <Link to={'/my?name=wxy'}>
                    <Button>传参</Button>
                </Link>


                {/* <div onClick={this.handleParams}>传参</div> */}
                {/* <div onClick={() => { this.props.history}}>传参</div> */}
            </div>
        )
    }
}
